package org.travel.app.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import org.travel.app.common.vo.ResultVO;
import org.travel.app.entity.Hotel;
import org.travel.app.mapper.HotelMapper;

/**
 * @author nmm
 * @date 2024-12-2024/12/11
 * @deriction 酒店controller
 */

@RestController
@RequestMapping("/hotel")
@RequiredArgsConstructor
public class HotelController extends BaseController{
    private final HotelMapper hotelMapper;

    @GetMapping("/getHotelList/{pageNum}/{pageSize}")
    public ResultVO getHotelList(@RequestBody Hotel hotel, @PathVariable("pageNum") int pageNum, @PathVariable("pageSize")int pageSize) {
        return success(hotelMapper.getHotelList(hotel,pageNum,pageSize));
    }

}